# Maintainer: justforlxz <justforlxz@gmail.com>
pkgname=deepin-movie-git
pkgver=5.9.8.r48.g225c49e9
pkgrel=1
sourcename=deepin-movie-reborn
sourcedir="$sourcename"
sourcetars=("$sourcename"_"$pkgver".tar.xz)
pkgdesc='Movie player based on mpv'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/deepin-movie-reborn"
license=('GPL3')
depends=('deepin-qt5integration-git'  'ffmpegthumbnailer' 'libxtst' 'mpv' 'qtdbusextended' 'qtmpris' 'gstreamer' 'glib2' 'qt5-multimedia')
makedepends=('cmake' 'gtest' 'ninja' 'qt5-tools')
provides=('deepin-movie')
conflicts=('deepin-movie')
groups=('deepin-extra-git')
options=('!lto')
source=("${sourcetars[@]}")
sha512sums=('SKIP')

prepare() {
    cd $sourcedir
}

build() {
  cd $sourcedir
  export CXXFLAGS+=' -fpermissive'
  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release .
  ninja
}

package() {
  cd $sourcedir
  DESTDIR="$pkgdir" ninja install
}
